<?php
class System_App_Manager_Page extends System_App_Noyau{
    private $_path;
    
    public function __construct(){
        if($this->rooter->getConfigModule() != 'system' ){
            $this->_path = $this->_getApplicationPath();
        }else{
            $this->_path = $this->_getSystemPath();
        }        
    }
    
    public function getPath(){
        return $this->_path;
    }
        
    private function _getApplicationPath(){
        $path = PUBLIC_PATH . 'layout/';
        $path .= ( $this->rooter->getConfigModule() != '' )?$this->rooter->getConfigModule().'/':'';
        $path .= $this->rooter->getConfigController().'/'.$this->rooter->getConfigAction().'.php';
        
        return $path;
        
    }
    private function _getSystemPath(){
        $path =  APP_PATH.'system/' . MODULE_PATH . $this->rooter->getConfigController() . '/view/'.$this->rooter->getConfigAction().'.php';
        
        return $path;
    }
}
?>
